﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net.Sockets;

namespace ggprot
{
    public class GGMsgAck : GGHeader
    {
        private int status;
        private int recepient;
        private int seq;

        public int Seq
        {
            get { return seq; }
            set { seq = value; }
        }

        public int Status
        {
            get { return status; }
            set { status = value; }
        }

        public int Recepient
        {
            get { return recepient; }
            set { recepient = value; }
        }

        public GGMsgAck(GGHeader header)
        {
            this.Type = header.Type;
            this.Length = header.Length;
        }

        public override void Read(NetworkStream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            status = reader.ReadInt32();
            recepient = reader.ReadInt32();
            seq = reader.ReadInt32();
        }
    }
}
